package
{
	import components.listen.ListenController;
	import components.socket.ClientSocket;
	
	import flash.display.Stage;
	import flash.utils.Dictionary;

	public class DemonDebugger
	{
		private static const _ins:DemonDebugger = new DemonDebugger();
		
		/**
		 * 初始化 
		 * 可监听多个对象
		 * @param obj
		 * 
		 */		
		public static function listen( obj:Object ):void
		{
			_ins.listen( obj );
		}
		
		private static var _stage:Stage;
		public static function initialize( stage:Stage ):void
		{
			_stage = stage;
		}
		
		public static function get stage():Stage
		{
			return _stage;
		}
		
		private var _dict:Dictionary;
		private var _listenObect:Object;
		
		public function DemonDebugger()
		{
			init();
		}
		
		private function init():void
		{
			_dict = new Dictionary();
		}
		
		public function listen( obj:Object ):void
		{
			if( _dict[obj] ) return;
			_dict[obj] = true;
			
			new ListenController( obj );
		}
	}
}




















